package com.shop.mms_client.db.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import com.shop.mms_client.model.BlacklistItem;

import java.util.List;

@Dao
public interface BlacklistDao {
    @Insert
    void insert(BlacklistItem item);

    @Delete
    void delete(BlacklistItem item);

    @Query("SELECT * FROM blacklist")
    LiveData<List<BlacklistItem>> getAllItems();

    @Query("SELECT * FROM blacklist WHERE type = :type")
    LiveData<List<BlacklistItem>> getItemsByType(String type);
} 